package com.wunong.smart.webapp.biz.configuration;

import com.wunong.smart.address.starter.UserAddressStarterConfiguration;
import com.wunong.smart.collection.starter.CollectionStarterConfiguration;
import com.wunong.smart.commission.starter.CommissionStarterConfiguration;
import com.wunong.smart.webapp.biz.AppStarterConst;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @author create by zealot.zt
 */
@Configuration
@EntityScan(value = {
        CommissionStarterConfiguration.PO_PACKAGE,
        UserAddressStarterConfiguration.PO_PACKAGE,
        CollectionStarterConfiguration.PO_PACKAGE,
})
@ConditionalOnProperty(prefix = AppStarterConst.CONFIG_AUTO_PREFIX,
        name = AppStarterConst.ENTITY_SCAN, havingValue = "true")
@PropertySource({AppStarterConst.DB_LOCATION})
public class EntityScanConfiguration {

    public EntityScanConfiguration() {
        super();
    }

}
